{% load staticfiles %}
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <title>
        欢迎访问在线学习网——{% block title %}{% endblock %}
    </title>
    <link rel="stylesheet" type="text/css" href="{% static 'css/reset.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/animate.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}">

    <link rel="stylesheet" type="text/css" href="{% static 'css/muke/course/learn-less.css' %}"/>
    <link rel="stylesheet" type="text/css" href="{% static 'css/muke/course/course-comment.css' %}"/>
    <link rel="stylesheet" type="text/css" href="{% static 'css/muke/base.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/muke/common-less.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/muke/course/common-less.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/mooc.css' %}"/>
    {% block custom_css %}{% endblock %}

    <script src="{% static 'js/jquery.min.js' %}" type="text/javascript"></script>
    <script src="{% static 'js/jquery-migrate-1.2.1.min.js' %}" type="text/javascript"></script>

    <link rel="shortcut icon" type="image/x-icon" href="{% static 'images/favicon.ico' %}"/>

</head>
<body>

<section class="headerwrap ">
    <header>
        <div class="header ">
            <div class="top">
                <div class="wp">
                    <div class="fl"><p>服务电话：<b>18274616715</b></p></div>

                    <!--验证是否已登录-->
                    {% if request.user.is_authenticated %}
                        {#登录后跳转#}
                        <div class="personal">
                            <dl class="user fr">
                                <dd>{{ request.user.nick_name }}<img class="down fr"
                                                                     src="{% static 'images/top_down.png' %}"/></dd>
                                <dt><img width="20" height="20" src="{{ MEDIA_URL }}{{ request.user.image }}"/></dt>
                            </dl>
                            <div class="userdetail">
                                <dl>
                                    <dt><img width="80" height="80" src="{{ MEDIA_URL }}{{ request.user.image }}"/></dt>
                                    <dd>
                                        <h2>{{ request.user.nick_name }}</h2>
                                        <p>{{ request.user.username }}</p>
                                    </dd>
                                </dl>
                                <div class="btn">
                                    <a class="personcenter fl" href="{% url 'users:userinfo' %}">进入个人中心</a>
                                    <a class="fr" href="{% url 'users:logout' %}">退出</a>
                                </div>
                            </div>
                        </div>
                    {% else %}
                        {#未登录显示#}
                        <a style="color:white" class="fr registerbtn" href="{% url 'users:register' %}">注册</a>
                        <a style="color:white" class="fr loginbtn" href="{% url 'users:login' %}">登录</a>
                    {% endif %}
                </div>
            </div>
            {#搜索功能#}
            <div class="middle">
                <div class="wp">
                    <a href="{% url 'index' %}"><img width="350" height="100" src="{% static 'images/logo.png' %}"/></a>
                    <div class="searchbox fr">
                        <div class="selectContainer fl">
                            {% if request.path|slice:'15' == '/org/teach_list' %}
                                <span class="selectOption" id="jsSelectOption" data-value="teacher">授课教师</span>
                            {% elif request.path|slice:'13' == '/org/org_list' %}
                                <span class="selectOption" id="jsSelectOption" data-value="org">课程机构</span>
                            {% else %}
                                <span class="selectOption" id="jsSelectOption" data-value="course">公开课</span>
                            {% endif %}

                            <ul class="selectMenu" id="jsSelectMenu">
                                <li data-value="course">公开课</li>
                                <li data-value="org">课程机构</li>
                                <li data-value="teacher">授课教师</li>
                            </ul>
                        </div>
                        <input id="search_keywords" class="fl" type="text"
                               value="{% if request.GET.keywords %}{{ request.GET.keywords }}{% endif %}"
                               placeholder="请输入搜索内容"/>
                        <img class="search_btn fr" id="jsSearchBtn" src="{% static 'images/search_btn.png' %}"/>
                    </div>
                </div>
            </div>


            <nav>
                <div class="nav">
                    <div class="wp">
                        <ul>
                            <li class="{% ifequal request.path '/' %}active{% endifequal %}">
                                <a href="{% url 'index' %}">首页</a>
                            </li>
                            <li class="{% ifequal request.path|slice:'7' '/course' %}active{% endifequal %}">
                                <a href="{% url 'courses:list' %}">公开课<img class="hot"
                                                                           src="{% static 'images/nav_hot.png' %}"></a>
                            </li>
                            <li class="{% ifequal request.path|slice:'15' '/org/teach_list' %}active{% endifequal %}">
                                <a href="{% url 'org:teach_list' %}">授课教师</a>
                            </li>
                            <li class="{% ifequal request.path|slice:'13' '/org/org_list' %}active{% endifequal %}">
                                <a href="{% url 'org:org_list' %}">授课机构</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </nav>

        </div>
    </header>
</section>

<!--sidebar start-->
<section>
    <ul class="sidebar">

        <li class="qq" title="QQ联系">
            {#            <a target="_blank" href="http://shang.qq.com/email/stop/email_stop.html?qq=1226900486&sig=398f693a80c4ed602a45372b5c1b5f7045f2b87a66326341&tttt=1"></a>#}
            <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=1226900486&site=qq&menu=yes"></a>
        </li>
        <li class="totop" title="返回顶部">
            <a href="#"></a>
        </li>

    </ul>
</section>
<!--sidebar end-->
{% block crumbs %} {% endblock %}
{% block body %}{% endblock %}

<footer>
    <div class="footer">
        <div class="wp">
            <ul class="cont">
                <li class=""><a href="#"><img src="{% static 'images/logo.png' %}"/></a></li>
                <li class="code"><img src="{% static 'images/getqrcode.jpeg' %}"/>
                    <p class="center">扫描关注微信</p></li>
                <li class="third"><img class="fl" src="{% static 'images/tell.png' %}"/>
                    <p class="tell">18274616715</p>
                    <p class="time">周一至周日 9:00-18:00</p></li>
            </ul>
        </div>
        <p class="line"></p>
        <div class="wp">
            <span class="fl">在线学习交流平台 保留所有权利 ©2019 Created by 传智专修学院-文新贵</span>

            <span class="fr">copyright  2019 <a class="wp"
                                                href="http://www.beian.miit.gov.cn">ICP备案证书号：湘ICP备19023465号-1</a></span>
        </div>
    </div>
</footer>


<script src="{% static 'js/selectUi.js' %}" type='text/javascript'></script>
<script src="{% static 'js/deco-common.js' %}" type='text/javascript'></script>
<script type="text/javascript" src="{% static 'js/plugins/laydate/laydate.js' %}"></script>
<script src="{% static 'js/plugins/layer/layer.js' %}"></script>
<script src="{% static 'js/plugins/queryCity/js/public.js' %}" type="text/javascript"></script>
<script src="{% static 'js/unslider.js' %}" type="text/javascript"></script>
<script src="{% static 'js/plugins/jquery.scrollLoading.js' %}" type="text/javascript"></script>

{#使用jQuery库#}
<script src="{% static 'js/deco-common.js' %}" type="text/javascript"></script>

{% block custom_js %} {% endblock %}

</body>
</html>